/*****************************************
 *  所有版权(c) 上海塔齐通讯技术有限公司       *
 *****************************************/
package com.touch.sysif.sms.api.model;

import java.util.Arrays;

/**
 * 短信回执
 * 
 * @version $Revision: 1.0 $ 
 * @author yanxiao
 * @date: Jan 17, 2014
 * @time: 10:18:21 PM
 */
public class SmsReport  implements java.io.Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = -8506186940325188388L;

	private String batchId;

    private String destAddr;

    private SubSmsMessage[] message;

    private java.util.Date receivedTime;

    private String sourceAddr;

    private int statusCode;

    private String statusText;

    public SmsReport() {
    }

    public SmsReport(
           String batchId,
           String destAddr,
           SubSmsMessage[] message,
           java.util.Date receivedTime,
           String sourceAddr,
           int statusCode,
           String statusText) {
           this.batchId = batchId;
           this.destAddr = destAddr;
           this.message = message;
           this.receivedTime = receivedTime;
           this.sourceAddr = sourceAddr;
           this.statusCode = statusCode;
           this.statusText = statusText;
    }


    /**
     * Gets the batchId value for this SmsReport.
     * 
     * @return batchId
     */
    public String getBatchId() {
        return batchId;
    }


    /**
     * Sets the batchId value for this SmsReport.
     * 
     * @param batchId
     */
    public void setBatchId(String batchId) {
        this.batchId = batchId;
    }


    /**
     * Gets the destAddr value for this SmsReport.
     * 
     * @return destAddr
     */
    public String getDestAddr() {
        return destAddr;
    }


    /**
     * Sets the destAddr value for this SmsReport.
     * 
     * @param destAddr
     */
    public void setDestAddr(String destAddr) {
        this.destAddr = destAddr;
    }


    /**
     * Gets the message value for this SmsReport.
     * 
     * @return message
     */
    public SubSmsMessage[] getMessage() {
        return message;
    }


    /**
     * Sets the message value for this SmsReport.
     * 
     * @param message
     */
    public void setMessage(SubSmsMessage[] message) {
        this.message = message;
    }


    /**
     * Gets the receivedTime value for this SmsReport.
     * 
     * @return receivedTime
     */
    public java.util.Date getReceivedTime() {
        return receivedTime;
    }


    /**
     * Sets the receivedTime value for this SmsReport.
     * 
     * @param receivedTime
     */
    public void setReceivedTime(java.util.Date receivedTime) {
        this.receivedTime = receivedTime;
    }


    /**
     * Gets the sourceAddr value for this SmsReport.
     * 
     * @return sourceAddr
     */
    public String getSourceAddr() {
        return sourceAddr;
    }


    /**
     * Sets the sourceAddr value for this SmsReport.
     * 
     * @param sourceAddr
     */
    public void setSourceAddr(String sourceAddr) {
        this.sourceAddr = sourceAddr;
    }


    /**
     * Gets the statusCode value for this SmsReport.
     * 
     * @return statusCode
     */
    public int getStatusCode() {
        return statusCode;
    }


    /**
     * Sets the statusCode value for this SmsReport.
     * 
     * @param statusCode
     */
    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }


    /**
     * Gets the statusText value for this SmsReport.
     * 
     * @return statusText
     */
    public String getStatusText() {
        return statusText;
    }


    /**
     * Sets the statusText value for this SmsReport.
     * 
     * @param statusText
     */
    public void setStatusText(String statusText) {
        this.statusText = statusText;
    }

    
    
    @Override
	public String toString() {
		return "SmsReport [batchId=" + batchId + ", destAddr=" + destAddr
				+ ", message=" + Arrays.toString(message) + ", receivedTime="
				+ receivedTime + ", sourceAddr=" + sourceAddr + ", statusCode="
				+ statusCode + ", statusText=" + statusText + "]";
	}



	private Object __equalsCalc = null;
    public synchronized boolean equals(Object obj) {
        if (!(obj instanceof SmsReport)) return false;
        SmsReport other = (SmsReport) obj;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.batchId==null && other.getBatchId()==null) || 
             (this.batchId!=null &&
              this.batchId.equals(other.getBatchId()))) &&
            ((this.destAddr==null && other.getDestAddr()==null) || 
             (this.destAddr!=null &&
              this.destAddr.equals(other.getDestAddr()))) &&
            ((this.message==null && other.getMessage()==null) || 
             (this.message!=null &&
              this.message.equals(other.getMessage()))) &&
            ((this.receivedTime==null && other.getReceivedTime()==null) || 
             (this.receivedTime!=null &&
              this.receivedTime.equals(other.getReceivedTime()))) &&
            ((this.sourceAddr==null && other.getSourceAddr()==null) || 
             (this.sourceAddr!=null &&
              this.sourceAddr.equals(other.getSourceAddr()))) &&
            this.statusCode == other.getStatusCode() &&
            ((this.statusText==null && other.getStatusText()==null) || 
             (this.statusText!=null &&
              this.statusText.equals(other.getStatusText())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getBatchId() != null) {
            _hashCode += getBatchId().hashCode();
        }
        if (getDestAddr() != null) {
            _hashCode += getDestAddr().hashCode();
        }
        if (getMessage() != null) {
            _hashCode += getMessage().hashCode();
        }
        if (getReceivedTime() != null) {
            _hashCode += getReceivedTime().hashCode();
        }
        if (getSourceAddr() != null) {
            _hashCode += getSourceAddr().hashCode();
        }
        _hashCode += getStatusCode();
        if (getStatusText() != null) {
            _hashCode += getStatusText().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(SmsReport.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://sms.sysif.touch.com/api/model", "SmsReport"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("batchId");
        elemField.setXmlName(new javax.xml.namespace.QName("", "batchId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("destAddr");
        elemField.setXmlName(new javax.xml.namespace.QName("", "destAddr"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("message");
        elemField.setXmlName(new javax.xml.namespace.QName("", "message"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://sms.sysif.touch.com/api/model", "SubSmsMessage"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("receivedTime");
        elemField.setXmlName(new javax.xml.namespace.QName("", "receivedTime"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "dateTime"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("sourceAddr");
        elemField.setXmlName(new javax.xml.namespace.QName("", "sourceAddr"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("statusCode");
        elemField.setXmlName(new javax.xml.namespace.QName("", "statusCode"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("statusText");
        elemField.setXmlName(new javax.xml.namespace.QName("", "statusText"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(true);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           String mechType,
           Class<?> _javaType,
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           String mechType,
           Class<?> _javaType,
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}
